package org.apache.flink.connector.httptm.factories;

import org.apache.flink.connector.httptm.RequestInfo;

import java.util.Map;

/**
 * 默认请求
 */
public class DefaultRequestFactory implements RequestFactory {

    @Override
    public String factoryIdentifier() {
        return "default";
    }

    @Override
    public RequestInfo createRequestInfo(String path, Map<String, String> headers, Map<String, String> params, String body, Map<String, Object> settings) throws Exception {
        RequestInfo requestInfo = new RequestInfo(path);
        requestInfo.setHeaders(headers);
        requestInfo.setQueryParams(params);
        requestInfo.setBody(body);
        return requestInfo;
    }
}
